﻿/*
 * Created by SharpDevelop.
 * User: chasanek
 * Date: 01-4-2011
 * Time: 11:27
 * 
 * To change this template use Tools | Options | Coding | Edit Standard Headers.
 */
using System;
using System.Drawing;
using System.Windows.Forms;

namespace legends
{
	/// <summary>
	/// Description of Form1.
	/// </summary>
	public partial class NewCharacterForm : Form
	{
		GameConstants gameConstants = new GameConstants(10,1024,768);		//initiates gameplay constants variable
		
		
		public NewCharacterForm(GameConstants gameCon)
		{
			//
			// The InitializeComponent() call is required for Windows Forms designer support.
			//
			InitializeComponent();
			//
			// Creating gameplay constants class for this form. Can be changed in setting
			//			
			gameConstants.setRes(gameCon.getResWidth(),gameCon.getResHeight());
			//
			// Changing resolution according to computers resolution
			//
			
			this.ClientSize = new System.Drawing.Size(gameConstants.getResWidth(),gameConstants.getResHeight());
			
			// 
			// Adding labels to panel1
			// 
			int i=0;
			System.Windows.Forms.Label[] labelArray = new System.Windows.Forms.Label[7];		//array of labels with names of attributes
			System.Windows.Forms.Label[] labelArray2 = new System.Windows.Forms.Label[7];		//array of labels with score of attributes 
			for (i=1;i<7;i++)	{
				labelArray[i] = new Label();
				labelArray2[i] = new Label();
				labelArray[i].Size = new System.Drawing.Size(100, gameConstants.getFontSize()*2);
				labelArray2[i].Size = new System.Drawing.Size(20, gameConstants.getFontSize()*2);
				labelArray[i].Location = new System.Drawing.Point(20, i*gameConstants.getFontSize()*3);
				labelArray2[i].Location = new System.Drawing.Point(200, i*gameConstants.getFontSize()*3);
				panel1.Controls.Add(labelArray[i]);	
				panel1.Controls.Add(labelArray2[i]);	
				}
			labelArray[1].Text="Strenght (STR)";labelArray[2].Text="Dexterity (DEX)";labelArray[3].Text="Constitution (CON)";
			labelArray[4].Text="Inteligence (INT)";labelArray[5].Text="Wisdom (WIS)";labelArray[6].Text="Charisma (CHA)";
			labelArray2[1].Text="10";labelArray2[2].Text="10";labelArray2[3].Text="10";
			labelArray2[4].Text="10";labelArray2[5].Text="10";labelArray2[6].Text="10";
			//
			// TODO: Add constructor code after the InitializeComponent() call.
			//
		}
		
		void Button4Click(object sender, EventArgs e)
		{
			this.Dispose();
			Application.Exit();
		}
		
		void Button1Click(object sender, EventArgs e)
		{
			Hero newHero = new Hero(0,"Gore",1000,1000,25,25,25,25,25,25);
		}
		
		void ComboBox1SelectedIndexChanged(object sender, EventArgs e)
		{
			
		}
		
		void Button5Click(object sender, EventArgs e)
		{
			Hero newHero = new Hero(0,"Gore",1000,1000,25,25,25,25,25,25);
			Game game = new Game("Test", newHero, 100, 1000000);
			
			GameForm gameForm = new GameForm(gameConstants,game);
			gameForm.Show();
			this.Visible=false;
		}
	}
}
